from abc import ABC, abstractmethod
from typing import Optional
from uuid import UUID

from .dto import UserCreateDTO, UserDTO, UserUpdateDTO


class UserFacade(ABC):
    """User domain facade interface."""

    @abstractmethod
    async def create_user(self, user_data: UserCreateDTO) -> UserDTO:
        """Create a new user."""
        pass

    @abstractmethod
    async def get_user_by_id(self, user_id: UUID) -> Optional[UserDTO]:
        """Get user by ID."""
        pass

    @abstractmethod
    async def get_user_by_username(self, username: str) -> Optional[UserDTO]:
        """Get user by username."""
        pass

    @abstractmethod
    async def get_user_by_email(self, email: str) -> Optional[UserDTO]:
        """Get user by email."""
        pass

    @abstractmethod
    async def update_user(self, user_id: UUID,
                          user_data: UserUpdateDTO) -> Optional[UserDTO]:
        """Update user information."""
        pass

    @abstractmethod
    async def delete_user(self, user_id: UUID) -> bool:
        """Delete user by ID."""
        pass

    @abstractmethod
    async def verify_credentials(self, username: str,
                                 password: str) -> Optional[UserDTO]:
        """Verify user credentials."""
        pass
